package com.dragon.interfaces.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serial;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * <p>
 * 菜单权限表
 * </p>
 *
 * @author dragon
 * @since 2024-08-01 18:05:09
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("sys_menu")
public class Menu extends BasicEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 菜单ID
     */
    @TableId(value = "menu_id", type = IdType.AUTO)
    private Long menuId;

    /**
     * 父菜单ID
     */
    @TableField("parent_id")
    private Long parentId;

    /**
     * 菜单名称
     */
    @TableField("menu_name")
    private String menuName;

    /**
     * 显示顺序
     */
    @TableField("menu_sort")
    private Integer menuSort;

    /**
     * 菜单类型（C菜单 F按钮）
     */
    @TableField("menu_type")
    private String menuType;

    /**
     * 显示状态（1显示 0隐藏）
     */
    @TableField("visible")
    private Byte visible;

    /**
     * 菜单状态（1正常 0停用）
     */
    @TableField("status")
    private Byte status;

    /**
     * 权限标识
     */
    @TableField("permission")
    private String permission;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 路由名称
     */
    @TableField("name")
    private String name;

    /**
     * 路由地址
     */
    @TableField("path")
    private String path;

    /**
     * 组件路径
     */
    @TableField("component")
    private String component;

    /**
     * 菜单图标
     */
    @TableField("icon")
    private String icon;

    /**
     * 菜单是否全屏
     */
    @TableField("is_full")
    private Byte isFull;

    /**
     * 活动菜单路由地址
     */
    @TableField("active_menu")
    private String activeMenu;

    /**
     * 路由重定向地址
     */
    @TableField("redirect")
    private String redirect;

    /**
     * 路由外链时填写的访问地址
     */
    @TableField("is_link")
    private String isLink;

    /**
     * 菜单是否固定在标签页中（1:是 0:否）
     */
    @TableField("is_affix")
    private Byte isAffix;

    /**
     * 路由是否缓存（1:是 0:否）
     */
    @TableField("is_keep_alive")
    private Byte isKeepAlive;

    public static final String MENU_ID = "menu_id";

    public static final String PARENT_ID = "parent_id";

    public static final String MENU_NAME = "menu_name";

    public static final String MENU_SORT = "menu_sort";

    public static final String MENU_TYPE = "menu_type";

    public static final String VISIBLE = "visible";

    public static final String STATUS = "status";

    public static final String PERMISSION = "permission";

    public static final String REMARK = "remark";

    public static final String NAME = "name";

    public static final String PATH = "path";

    public static final String COMPONENT = "component";

    public static final String ICON = "icon";

    public static final String IS_FULL = "is_full";

    public static final String ACTIVE_MENU = "active_menu";

    public static final String REDIRECT = "redirect";

    public static final String IS_LINK = "is_link";

    public static final String IS_AFFIX = "is_affix";

    public static final String IS_KEEP_ALIVE = "is_keep_alive";

}
